package com.ruoyi.app.service.impl;

import com.ruoyi.app.domain.Healthy;
import com.ruoyi.app.mapper.HealthyMapper;
import com.ruoyi.app.service.HealthyService;
import com.ruoyi.app.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HealthyServiceImpl implements HealthyService {
    @Autowired
    private HealthyMapper healthyMapper;

    @Override
    public Result list() {
        List<Healthy> healthy = healthyMapper.selectAll();
        System.err.println(healthy);
        return Result.ok(healthy);
    }

    @Override
    public Result selectId(Long id) {
        return Result.ok(healthyMapper.selectId(id));
    }
}
